package com.freesky.web.manager.remote.order;

import com.freesky.common.dao.entity.Express;
import com.freesky.common.pojo.DataTablesResult;
import com.freesky.common.utils.reponse.JSONResponse;
import com.freesky.web.manager.remote.order.fallback.ExpressRemoteFallback;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "emall-provider-zuul", fallback = ExpressRemoteFallback.class)
public interface ExpressRemote {
    String ZUUL_URL_PREFIX = "/mysevice/order";
    String URL_PREFIX = "/express";

    @GetMapping(value = ZUUL_URL_PREFIX + URL_PREFIX + "/list")
    DataTablesResult addressList() ;

    @PutMapping(value = ZUUL_URL_PREFIX + URL_PREFIX + "/add")
     JSONResponse addExpress(@RequestBody Express express) ;

    @PostMapping(value = ZUUL_URL_PREFIX + URL_PREFIX + "/update")
     JSONResponse updateAddress(@RequestBody Express express) ;

    @DeleteMapping(value = ZUUL_URL_PREFIX + URL_PREFIX + "/del/{ids}")
     JSONResponse delAddress(@PathVariable(value = "ids") int[] ids) ;
}
